package com.evildog.workspace.invest.application.convert;

import com.evildog.workspace.common.result.PagedResult;
import java.util.List;
import com.evildog.workspace.invest.application.vo.BudgetPageVO;
import com.evildog.workspace.invest.application.vo.BudgetListVO;
import com.evildog.workspace.invest.application.vo.BudgetVO;
import com.evildog.workspace.invest.application.dto.BudgetPageDTO;
import com.evildog.workspace.invest.application.dto.BudgetListDTO;
import com.evildog.workspace.invest.application.dto.BudgetDTO;
import com.evildog.workspace.invest.application.model.BudgetParam;
import com.evildog.workspace.invest.application.model.BudgetPageParam;
import com.evildog.workspace.invest.application.model.BudgetListParam;
import com.evildog.workspace.invest.application.bo.BudgetBO;
import com.evildog.workspace.invest.application.bo.BudgetPageBO;
import com.evildog.workspace.invest.application.bo.BudgetListBO;
import com.evildog.workspace.invest.application.entity.Budget;
import com.evildog.workspace.invest.application.entity.BudgetPageDO;
import com.evildog.workspace.invest.application.entity.BudgetListDO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper
public interface BudgetConvert {

    BudgetConvert INSTANCE = Mappers.getMapper(BudgetConvert.class);

    BudgetPageDTO convert(BudgetPageParam budgetPageParam);

    BudgetListDTO convert(BudgetListParam budgetListParam);

    BudgetDTO convert(BudgetParam budgetParam);

    @Mapping(target = "isDeleted", ignore = true)
    Budget convert(BudgetDTO budgetDTO);

    BudgetPageDO convert(BudgetPageDTO budgetPageDTO);

    BudgetVO convert(BudgetBO budgetBO);

    BudgetBO convert(Budget budget);

    List<BudgetListBO> convert(List<BudgetListDO> budgetList);

    List<BudgetListVO> convertVoList(List<BudgetListBO> budgetListBO);

    @Mappings({})
    PagedResult<BudgetPageBO> convert(IPage<BudgetPageDO> page);

    PagedResult<BudgetPageVO> convert(PagedResult<BudgetPageBO> page);
}